/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.grnt.dbcommon;

import java.util.List;

/**
 * ControlBean is an interface a generic component plugin to controler class.
 * It providing a serial data managerment commands in a trasaction by getCommand
 * method.
 * @author sayid
 */
public interface ControlBean {
	/**
	 *
	 * Class DataControler will uses this method to retrieve a serial commands
	 * of a transaction.
	 * @return A serial DML commands witch are in a transaction. DataControler
	 * class call them by sequence order.
	 */
	public List<String> getCommands();
	/**
	 * 
	 * This method will be callbacked by DataControler before end of transaction.
	 * @return It returns a boolean value represents computing is wether
	 * successful or not.
	 */
	public boolean doInTransaction();

	/**
	 * 
	 * This method will be callbacked by DataControler after end of transaction.
	 * @param action It is given by DataControler class represents the transaction
	 * is wether successful. Then program to deceasion follow doing.
	 */
	public void doAfterTransaction(DataControler.TransOpt action);
}
